package aicue1.beans;

import aicue1.AICUE1Util.Payment_Preference;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "Customer")
public class Customer
{
    //@XmlAttribute
    private String id;

    //@XmlElement
    private String name;
    private Address address;
    private Payment_Preference payment_Preference;

    public Customer()
    {
    }

    public Customer(String id, String name, Address address, Payment_Preference payment_Preference)
    {
        this.id = id;
        this.name = name;
        this.address = address;
        this.payment_Preference = payment_Preference;
    }

    @XmlAttribute
    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    @XmlElement
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @XmlElement
    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    @XmlElement
    public Payment_Preference getPayment_Preference() {
        return payment_Preference;
    }

    public void setPayment_Preference(Payment_Preference payment_Preference) {
        this.payment_Preference = payment_Preference;
    }


    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final Customer other = (Customer) obj;
        if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id))
            return false;
        return true;
    }

    @Override
    public int hashCode()
    {
        int hash = 7;
        hash = 19 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}